package com.reform.controller.project;


import com.reform.res.Result;
import com.reform.service.IProjectClassificationService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.sql.SQLException;

/**
 * <p>
 * 项目分类表（专家） 前端控制器
 * </p>
 *
 * @author mortale
 * @since 2021-07-15
 */
@Api(tags = "ProjectClassificationController")
@RestController
@RequestMapping("/project-classification")
public class ProjectClassificationController {

    @Autowired
    IProjectClassificationService projectClassificationService;

    @ApiOperation(value = "根据batchId获取分类名称", notes = "根据batchId获取分类名称")
    @PostMapping("/getClassificationById")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "batchId", value = "批次id", paramType = "query", dataTypeClass = String.class, required = true),
    })
    public Result getAllBatchById(String batchId) throws SQLException {
        return projectClassificationService.getClassificationById(batchId);
    }
}
